//
//  OWWVCPushAnimation.m
//  Ohwawa
//
//  Created by jing ling on 2017/12/17.
//  Copyright © 2017年 changyi. All rights reserved.
//

#import "OWWVCPushAnimation.h"


@implementation OWWVCPushAnimation
- (void)animateTransitionEvent {
    [self.containerView addSubview:self.toVC.view];
    CGRect frame = CGRectMake(0, 0, kScreenWidth, kScreenHeight);
    frame.origin.x = -frame.size.width;
    self.toVC.view.frame = frame;
    [UIView animateWithDuration:self.transitionDuration animations:^{
        CGRect frame = self.toVC.view.frame;
        frame.origin.x = 0;
        self.toVC.view.frame = frame;
    } completion:^(BOOL finished) {
        [self completeTransition];
    }];
}
@end
